<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-home"></i></a>
  <ul>
  	@foreach($controllers as $key => $controller)
    <li @if(isset($nowController) && $nowController->pid==$controller['id'])class="submenu open" @else class="submenu" @endif><a href="#"><i class="icon icon-th-list"></i> <span>{{$controller['name']}}</span></a>
      <ul>
      	@foreach($controller['children'] as $k => $v)
        <li @if(isset($nowController) && $nowController->id==$v['id'])class="active"@endif><a href="{{$v['url']}}">{{$v['name']}}</a></li>
        @endforeach
      </ul>
    </li>
    @endforeach
  </ul>
</div>